The characteristics that govern a sequence grabber operation fall into two main categories: those that apply to the sequence grabber component, and those that apply to an individual channel that has been created for the sequence grabber. Sequence grabber components provide a number of functions in each category. This section describes the functions that allow you to configure the characteristics of the sequence grabber component. See "Working With Channel Characteristics," for information about functions that apply to a single channel.
Use the SGSetMaximumRecordTime function to limit the duration of a record operation. You can retrieve this time limit by calling the SGGetMaximumRecordTime function.
The SGSetFlags function allows you to set control flags that govern an operation. Use the SGGetFlags function to retrieve those flags.
You can obtain information about the progress of a record operation by calling the SGGetStorageSpaceRemaining and SGGetTimeRemaining functions.
You can retrieve a reference to the time base used by a sequence grabber component by calling the SGGetTimeBase function.
You can limit the duration of a record operation by calling the SGSetMaximumRecordTime function. You specify the time limit as an exact number of Macintosh system ticks (each is approximately a sixtieth of a second). The most efficient technique for monitoring this time limit is to examine the result code from the SGIdle function, which is described on SGIdle . When the time limit expires, the sequence grabber component sets that result code to grabTimeComplete .
pascal ComponentResult SGSetMaximumRecordTime (SeqGrabComponent s,
unsigned long ticks);
By default, there is no time limit on a record operation. If you do not set a limit, a record operation will run until it exhausts the Operating System resources or you call the SGStop function (described on SGStop ). Memory and disk space are the two major limiting factors.
You must call the SGSetMaximumRecordTime function before you start the record operation.
The SGGetMaximumRecordTime function allows you to determine the time limit you have set for a record operation.
pascal ComponentResult SGGetMaximumRecordTime (SeqGrabComponent s,
unsigned long *ticks);
The SGGetStorageSpaceRemaining function allows you to monitor the amount of space remaining for use during a record operation. You can use this function to monitor the space being used so that you can limit the amount of space consumed by an operation. Alternatively, you can use the information you receive from this function to update a status display for the user.
pascal ComponentResult SGGetStorageSpaceRemaining
(SeqGrabComponent s,
unsigned long *bytes);
The SGGetStorageSpaceRemaining function returns information that is appropriate for the output conditions you establish with the SGSetDataOutput function, which is described on SGSetDataOutput . If you are recording to memory, this function returns information about the amount of memory remaining. If you are recording to a movie file, this function returns information about the amount of storage space available on the device that holds the file.
You can call this function only after you have started a record operation.
The SGGetTimeRemaining function allows you to obtain an estimate of the amount of recording time that remains for the current record operation. The sequence grabber component estimates this value based on the amount of storage remaining and the speed with which the record operation is consuming that space. This estimate improves as the record process continues. If you have limited the record time by calling the SGSetMaximumRecordTime function (see SGSetMaximumRecordTime for details), SGGetTimeRemaining does not return a value that is greater than the limit you have set.
pascal ComponentResult SGGetTimeRemaining (SeqGrabComponent s,
long *ticksLeft);
You can call the SGGetTimeRemaining function only after you have started a record operation.
The SGGetTimeBase function allows you to retrieve a reference to the time base that is being used by a sequence grabber component.
pascal ComponentResult SGGetTimeBase (SeqGrabComponent s,
TimeBase *tb);
The SGSetFlags function allows you to pass control information about the current operation to the sequence grabber component.
pascal ComponentResult SGSetFlags (SeqGrabComponent s,
long sgFlags);
You can retrieve a sequence grabber's control flags by calling the SGGetFlags function.
pascal ComponentResult SGGetFlags (SeqGrabComponent s,
long *sgFlags) ;